package com.gxc.dbcore.util;

import java.util.HashMap;

/**
 * 忽略大小写（get和put时将key统一为小写）
 * 
 * @author gxc
 * 
 */
@SuppressWarnings("rawtypes")
public class BeanMap extends HashMap {

	private static final long serialVersionUID = 1796294592352413662L;

	@SuppressWarnings("unchecked")
	public Object put(Object key, Object value) {
		if (key instanceof String && key != null) {
			key = ((String) key).toLowerCase();
		}
		return super.put(key, value);
	}

	public Object get(Object key) {
		if (key instanceof String && key != null) {
			key = ((String) key).toLowerCase();
		}
		return super.get(key);
	}
}
